﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" 
    MaintainScrollPositionOnPostback="true" EnableEventValidation="true" ValidateRequest="false"
    Async="true"  CodeFile="car-insurance-promotion-suv-teana-prius.aspx.cs" Inherits="promotion_car_insurance_promotion_suv_teana_prius" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script type="text/javascript">
        //<![CDATA[
        (function() {
            var shr = document.createElement('script');
            shr.setAttribute('data-cfasync', 'false');
            shr.src = '//dsms0mj1bbhn4.cloudfront.net/assets/pub/shareaholic.js';
            shr.type = 'text/javascript'; shr.async = 'true';
            shr.onload = shr.onreadystatechange = function() {
                var rs = this.readyState;
                if (rs && rs != 'complete' && rs != 'loaded') return;
                var site_id = '3c11e36b96421cf905198a8914418219';
                try { Shareaholic.init(site_id); } catch (e) { }
            };
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(shr, s);
        })();
        //]]>
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpHeader" runat="Server">
    <div class="main-bg">
        <div class="radius-box">
            <div class="general-col-left">
                <div class="main-title-heading">
                    <%=GetGlobalResourceObject("General", "LetusCallBack")%></div>
            <asp:UpdatePanel ID="updatepanel" runat="server">
            <ContentTemplate>
                <div style="width: 440px;">
                    <asp:ValidationSummary ID="vsCallme" runat="server" ValidationGroup="callme" ShowSummary="True"
                        HeaderText="<%$ Resources:General,RequiredValidation%>" CssClass="error-msg" />
                </div>
                <div>
                    <div class="form-column">
                        <span style="color: #FF0004">*</span><%=GetGlobalResourceObject ("CarInsurance","CallMeAt") %>:</div>
                    <div class="form-row">
                        <asp:DropDownList CssClass="input-fields-dropdown" runat="server" ID="ddlCallMeTime">
                            <asp:ListItem Value="-1" Text="<%$Resources:CarInsurance,Select %>" />
                            <asp:ListItem Value="1" Text="<%$Resources:CarInsurance,CallMeMorning %>" />
                            <asp:ListItem Value="2" Text="<%$Resources:CarInsurance,CallMeAfternoon %>" />
                            <asp:ListItem Value="3" Text="<%$Resources:CarInsurance,CallMeEvening %>" />
                            <asp:ListItem Value="4" Text="<%$Resources:CarInsurance,CallMeAnytime %>" />
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="rfvCallMeTime" runat="server" CssClass="validationError"
                            ValidationGroup="callme" ErrorMessage="" Text="" InitialValue="-1" ControlToValidate="ddlCallMeTime"></asp:RequiredFieldValidator>
                    </div>
                </div>
                <div>
                    <div class="form-column">
                        <span style="color: #FF0004">*</span><asp:Label ID="lblCoverCommencementDate" runat="server"
                            Text="<%$ Resources:CarInsurance,CommencementDate%>" />:</div>
                    <div class="form-row">
                        <asp:DropDownList ID="ddlCoverageComMonth" runat="server" CssClass="input-fields-dropdown">
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator CssClass="validationError" ID="rfvCoverComMonth" runat="server"
                            InitialValue="-1" ControlToValidate="ddlCoverageComMonth" ErrorMessage="" ValidationGroup="callme"
                            Display="Dynamic"></asp:RequiredFieldValidator>
                    </div>
                </div>
                <div id="divButtonWithCookies">
                    <div class="form-row-full">
                        <asp:CheckBox ID="checkIsAgreementXvaues" runat="server" onclick="CheckedChanged();" />
                        <asp:Label ID="lblAgreementXvaues" runat="server" Text="<%$ Resources:General,Agreement%>"
                            CssClass="check-agree-text"></asp:Label>
                        <asp:RequiredFieldValidator ID="rfvIsAcceptXvaues" runat="server" ControlToValidate="txtIsAcceptXvaues"
                            CssClass="validationError" Display="Dynamic" ErrorMessage="" ValidationGroup="callme"></asp:RequiredFieldValidator>
                        <div style="display:none;">
                            <asp:TextBox ID="txtIsAcceptXvaues" runat="server"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-row-full">
                        <asp:Button ID="btnSubmitXvaues" ValidationGroup="callme" Text="<%$Resources:General,Submit%>"
                            runat="server" CssClass="action-button" OnClick="btnSubmit_Click" Width="150"
                            OnClientClick="LoadValidationErrorCss();CheckedChanged();if (Page_ClientValidate('callme')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'action-button-processing';}" />
                    </div>
                </div>
                </ContentTemplate>
                </asp:UpdatePanel>
                <div class="form-row-full" id="divEditOption">
                    <div class="heading-sub-title" style="width: 300px; float: left;">
                        <%=GetGlobalResourceObject("General", "YourDetails")%></div>
                    <div style="float: right; width: 140px; text-align: right; padding-top: 20px;">
                        <a href="" class="general-links" style="text-align: right;" onclick="EnableEditDetails();return false;">
                            <img src="/images/edit.png" width="16" height="16" alt="" /><%=GetGlobalResourceObject("General", "Edit")%></a>
                    </div>
                </div>
                <div>
                    <div class="form-column">
                        <span style="color: #FF0004">*</span><asp:Label ID="lblFullName" runat="server" Text="<%$ Resources:CarInsurance,FullName%>" />:</div>
                    <div class="form-row">
                        <asp:TextBox ID="txtName" CssClass="input-fields" runat="server" MaxLength="50"></asp:TextBox>
                        <cc1:TextBoxWatermarkExtender ID="tbwName" runat="server" TargetControlID="txtName"
                            WatermarkCssClass="input-fields" WatermarkText="<%$Resources:General,EnterName%>">
                        </cc1:TextBoxWatermarkExtender>
                        <asp:RequiredFieldValidator ID="rfvName" runat="server" Text="" CssClass="validationError"
                            ValidationGroup="callme" ErrorMessage="" ControlToValidate="txtName" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="revName" Text="" CssClass="validationError" runat="server"
                            ValidationGroup="callme" ErrorMessage="" ControlToValidate="txtName" ValidationExpression="^([\u0000-\uDFFF']{1,50})$|^([a-zA-Z''-'\s]{1,50})$"
                            Display="Dynamic"></asp:RegularExpressionValidator>
                    </div>
                </div>
                <div>
                    <div class="form-column">
                        <span style="color: #FF0004">*</span><asp:Label ID="lblEmail" runat="server" Text="<%$ Resources:CarInsurance,EmailAddress%>" />:</div>
                    <div class="form-row">
                        <asp:TextBox ID="txtEmail" CssClass="input-fields" runat="server" MaxLength="100"></asp:TextBox>
                        <div style="padding-top: 5px; width: 25px; float: right;">
                            <img src="/images/lock.png" alt="" height="25" width="25" />
                        </div>
                        <cc1:TextBoxWatermarkExtender ID="tbwEmail" runat="server" TargetControlID="txtEmail"
                            WatermarkCssClass="input-fields" WatermarkText="<%$Resources:General,EnterEmail%>">
                        </cc1:TextBoxWatermarkExtender>
                        <asp:RequiredFieldValidator ID="rfvEmail" runat="server" Text="" CssClass="validationError"
                            ValidationGroup="callme" ErrorMessage="" ControlToValidate="txtEmail" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="revEmail" Text="" CssClass="validationError"
                            runat="server" ValidationGroup="callme" ErrorMessage="" ControlToValidate="txtEmail"
                            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
                    </div>
                </div>
                <div>
                    <div class="form-column">
                        <span style="color: #FF0004">*</span><asp:Label ID="lblMobile" runat="server" Text="<%$ Resources:CarInsurance,MobileNo%>" />:</div>
                    <div class="form-row">
                        <asp:TextBox runat="server" ID="txtMobile" CssClass="input-fields" MaxLength="10"></asp:TextBox>
                        <div style="padding-top: 5px; width: 25px; float: right;">
                            <img src="/images/lock.png" alt="" height="25" width="25" />
                        </div>
                        <cc1:TextBoxWatermarkExtender ID="tbwMobile" runat="server" TargetControlID="txtMobile"
                            WatermarkCssClass="input-fields" WatermarkText="<%$Resources:General,MobileExample%>">
                        </cc1:TextBoxWatermarkExtender>
                        <asp:RequiredFieldValidator ID="rfvMobile" runat="server" ControlToValidate="txtMobile"
                            CssClass="validationError" Display="Dynamic" ErrorMessage="" ValidationGroup="callme"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="revMobile" runat="server" ControlToValidate="txtMobile"
                            CssClass="validationError" ErrorMessage="" ValidationExpression="0[5-9]\d{8}"
                            ValidationGroup="callme"></asp:RegularExpressionValidator>
                    </div>
                </div>
                <div id="divButtonNoCookies">
                    <div class="form-row-full" id="divAgreement" style="float: left; padding-top: 20px;">
                        <asp:CheckBox ID="checkIsAgreement" runat="server" onclick="CheckedChanged();" />
                        <asp:Label ID="lblAgreement" runat="server" Text="<%$ Resources:General,Agreement%>"
                            CssClass="check-agree-text"></asp:Label>
                        <asp:RequiredFieldValidator ID="rfvIsAccept" runat="server" ControlToValidate="txtIsAccept"
                            CssClass="validationError" Display="Dynamic" ErrorMessage="" ValidationGroup="callme"></asp:RequiredFieldValidator>
                        <div style="display:none;">
                            <asp:TextBox ID="txtIsAccept" runat="server"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-row-full">
                        <asp:Button ID="btnSubmit" ValidationGroup="callme" Text="<%$Resources:General,Submit%>"
                            runat="server" CssClass="action-button" OnClick="btnSubmit_Click" Width="150"
                            OnClientClick="LoadValidationErrorCss();CheckedChanged();if (Page_ClientValidate('callme')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'action-button-processing';}" />
                    </div>
                </div>
                <div style="float: left; margin-top: 5px;">
                    <img src="<%=GetGlobalResourceObject("ImageResource", "ImgORUrl")%>" width="427"
                        height="28" alt="" /></div>
                <div style="float: left; margin-right: 20px;">
                        <img src="<%=GetGlobalResourceObject("ImageResource", "ImgIconHotlineUrl")%>" width="151"
                            height="162" alt="" />
                </div>
                <div>
                    <asp:HyperLink ID="hplCarQuote" runat="server"> <img src="<%=GetGlobalResourceObject("ImageResource", "ImgIconQuoteUrl")%>"
                    width="151" height="162" alt="" /></asp:HyperLink>
                </div>
            </div>
            <div class="general-col-right">
                <div class="promo-car-suv-teana">
                    <%--<div class="promo-title">
                        <asp:Label ID="lblPromotion" runat="server" Text="<%$Resources:Home,PromotionThree%>"></asp:Label>
                    </div>--%>
                    <div class="promo-title">
                        <div class="promo-heading">
                            <%=GetGlobalResourceObject("Promotion", "SuvTeanaPrius")%></div>
                        <div class="promo-sub-heading">
                            <%=GetGlobalResourceObject("Promotion", "Year2012to2013")%></div>
                        <%=GetGlobalResourceObject("Promotion", "SumInsure")%>: <span style="color: #cd0b01;
                            font-size: 20px; font-weight: bold;">
                            <%=GetGlobalResourceObject("Promotion", "Amount900000")%></span>
                        <%=GetGlobalResourceObject("Promotion", "Bhat")%><br />
                        <%=GetGlobalResourceObject("Promotion", "Premium")%>: <span style="color: #3a59a5;
                            font-size: 20px; font-weight: bold;">
                            <%=GetGlobalResourceObject("Promotion", "Amount19200")%></span>
                        <%=GetGlobalResourceObject("Promotion", "Bhat")%><br />
                        <%=GetGlobalResourceObject("Promotion", "Dealer")%>
                    </div>
                </div>
                <div class="promo-col-3">
                    <div class="sub-heading">
                        <%=GetGlobalResourceObject("CarInsurance", "ShareExperience")%>:</div>
                    <div class='shareaholic-canvas' data-app='share_buttons' data-app-id='11407961'>
                    </div>
                </div>
            </div>
            <div style="display: none;">
                <asp:Label ID="lblPromotionTitle" runat="server" Text="<%$ Resources:CarInsurance,PromotionSelected%>" />:
                <asp:Label ID="lblPromotionName" runat="server" Text="Promotion3" />
            </div>
        </div>
    </div>

    <script type="text/javascript">
        $(document).ready(function() {

            if (readCookie("GGQuote") == null) {
                //ShowHideDiv('divAgreement', true);
                ShowHideDiv('divButtonNoCookies', true);
                ShowHideDiv('divButtonWithCookies', false);
                ShowHideDiv('divEditOption', false);
                document.getElementById("<%=txtName.ClientID%>").className = "input-fields";
                document.getElementById("<%=txtMobile.ClientID%>").className = "input-fields";
                document.getElementById("<%=txtEmail.ClientID%>").className = "input-fields";
            }
            else {
                //ShowHideDiv('divAgreement', false);
                ShowHideDiv('divButtonNoCookies', false);
                ShowHideDiv('divButtonWithCookies', true);
                ShowHideDiv('divEditOption', true);
                document.getElementById("<%=txtName.ClientID%>").className = "input-fields-disable";
                document.getElementById("<%=txtMobile.ClientID%>").className = "input-fields-disable";
                document.getElementById("<%=txtEmail.ClientID%>").className = "input-fields-disable";
                document.getElementById("<%=txtName.ClientID%>").disabled = true;
                document.getElementById("<%=txtMobile.ClientID%>").disabled = true;
                document.getElementById("<%=txtEmail.ClientID%>").disabled = true;
            }
        });
        function readCookie(name) {
            var nameEQ = name + "=";
            var ca = document.cookie.split(';');
            for (var i = 0; i < ca.length; i++) {
                var c = ca[i];
                while (c.charAt(0) == ' ') c = c.substring(1, c.length);
                if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
            }
            return null;
        }

        function EnableEditDetails() {
            document.getElementById("<%=txtName.ClientID%>").disabled = false;
            document.getElementById("<%=txtMobile.ClientID%>").disabled = false;
            document.getElementById("<%=txtEmail.ClientID%>").disabled = false;

            document.getElementById("<%=txtName.ClientID%>").className = "input-fields";
            document.getElementById("<%=txtMobile.ClientID%>").className = "input-fields";
            document.getElementById("<%=txtEmail.ClientID%>").className = "input-fields";
        }

        function ShowHideDiv(diveName, varOnOff) {
            document.getElementById(diveName).style.display = varOnOff == true ? '' : 'none';
        }

        function CheckedChanged() {
            if (readCookie("GGQuote") == null) {
                var ctrlTxt = document.getElementById('<%=txtIsAccept.ClientID %>');
                var ctrlAgree = document.getElementById('<%=checkIsAgreement.ClientID %>');
                var lblAgree = document.getElementById('<%=lblAgreement.ClientID %>');
                var ctrlAgreeXvaues = document.getElementById('<%=checkIsAgreementXvaues.ClientID %>');
                var ctrlTxtXvaues = document.getElementById('<%=txtIsAcceptXvaues.ClientID %>');
                ctrlAgreeXvaues.checked = true;
                ctrlTxtXvaues.value = '1';
                ctrlTxt.value = '1';
                lblAgree.setAttribute("class", "check-agree-text");
                if (ctrlAgree.checked == false) {
                    ctrlTxt.value = '';
                    lblAgree.setAttribute("class", "check-agree-text validationError");
                }
            }
            else {
                var ctrlTxt = document.getElementById('<%=txtIsAcceptXvaues.ClientID %>');
                var ctrlAgree = document.getElementById('<%=checkIsAgreementXvaues.ClientID %>');
                var lblAgree = document.getElementById('<%=lblAgreementXvaues.ClientID %>');
                var ctrlAgreeOriginal = document.getElementById('<%=checkIsAgreement.ClientID %>');
                var ctrlTxtXvaues = document.getElementById('<%=txtIsAccept.ClientID %>');
                ctrlTxt.value = '1';
                ctrlTxtXvaues.value = '1';
                ctrlAgreeOriginal.checked = true;
                lblAgree.setAttribute("class", "check-agree-text");
                if (ctrlAgree.checked == false) {
                    ctrlTxt.value = '';
                    ctrlAgreeOriginal.checked = false;
                    lblAgree.setAttribute("class", "check-agree-text validationError");
                }
            }
        }
    </script>

    <script type="text/javascript">
        /* <![CDATA[ */
        var google_conversion_id = 1013678288;
        var google_custom_params = window.google_tag_params;
        var google_remarketing_only = true;
        /* ]]> */
    </script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpBody" Runat="Server">
</asp:Content>

